package com.doctcloud.hisinfo.medrec.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.doctcloud.hisinfo.histable.domain.medrec.TransferDo;
import com.doctcloud.hisinfo.medrec.mapper.TransferDoMapper;
import com.doctcloud.hisinfo.medrec.service.ITransferService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TransferService extends ServiceImpl<TransferDoMapper, TransferDo> implements ITransferService {
    @Override
    public List<TransferDo> listByPat(String patientId, Integer visitId) {
        LambdaQueryWrapper<TransferDo> query = Wrappers.lambdaQuery();
        query.eq(TransferDo::getPatientId,patientId)
                .eq(TransferDo::getVisitId,visitId);
        return baseMapper.selectList(query);
    }
}
